Removing Carriage Return from end of RTF string

Hello,

What I am tring to do is to output from DOORS the text with the RTF settings preserved.  Issue is that when I use the commands to copy to the clipboard an extra line feed is added.  What I need to do is to remove this line feed before pasting from the clipboard.  I have stumbled across this topic before, but it was not of interest to me at that time.  Try as I can now, I cannot find the posting.  If possible, would you please send me the link to the post answering this question, or provide the solution directly?

Thanks in advance.


Mike.P.Adams - Mon Jun 27 08:14:21 EDT 2016

Re: Removing Carriage Return from end of RTF string
DOORSHAM - Mon Jun 27 12:17:33 EDT 2016

Don't look for carriage return -- look for a paragraph tag.

Re: Removing Carriage Return from end of RTF string
Mike.P.Adams - Mon Jun 27 12:39:24 EDT 2016

OK, but what I am looking for is the code that removes this tag from the text in the clipboard.  I know that this code exists and I was hoping that someone could point me to it so that I would not have to write the code to remove this tag.  I tried writing it myself prior to posting the original request and it worked in some cases, but not all and before I spend a lot of time debugging, I was hoping to get hold of code that is already tested.

Re: Removing Carriage Return from end of RTF string
DOORSHAM - Tue Jun 28 06:12:35 EDT 2016

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014972919&ps=25